package edu.kjxy.demo0409;

public class Demo02 {

	public static void main(String[] args) {
		String s1 = "kjxy";
		String s2 = "123";
		
		String s3 = s1.concat(s2);  //字符串拼接
		String s4 = s1 + s2;
		
		System.out.println(s3);
		System.out.println(s4);
		
		System.out.println(s3 == s4); //对象比较不能用“==”
		
		boolean flag = s3.equals(s4);
		System.out.println(flag);
		
	}

}
